package com.weipai.springboot.module.mapper;

import com.weipai.springboot.model.PictureCategory;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

public interface PictureCategoryMapper {
    int deleteByPrimaryKey(Integer pictureCategoryId);

    int insert(PictureCategory record);

    int insertSelective(PictureCategory record);

    PictureCategory selectByPrimaryKey(Integer pictureCategoryId);

    int updateByPrimaryKeySelective(PictureCategory record);

    int updateByPrimaryKey(PictureCategory record);

    //图片分类的修改
    @Update("update c_picture_category set picture_category_name=#{name} where picture_category_id=#{id}")
    int updatePictureCategory(@Param("id") Integer id, @Param("name") String categoryName);

    //获取图片分类的详情
    Map<String,Object> getPictureCategoryInfo(Integer id);

    //图片分类的删除
    int batchDeleteByCategoryId(Integer[] id);

    //图片分类列表
    List<PictureCategory> pictureCategoryList();
}